home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4892 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  878 b 

  1. Path: remus.rutgers.edu!not-for-mail
  2. From: wempa@remus.rutgers.edu (Force Of Nature)
  3. Newsgroups: comp.lang.c
  4. Subject: Character String --> Integer
  5. Date: 7 Feb 1996 15:02:18 -0500
  6. Organization: Rutgers University LCSR
  7. Message-ID: <4fb0ga$lsa@remus.rutgers.edu>
  8. NNTP-Posting-Host: remus-fddi.rutgers.edu
  9.  
  10. Is there an easy way to convert a character string such as '2425' to the
  11. integer 2425 ???  The only way I can think of is to pick off characters 
  12. one at a time and use switch statements to determine the value (0-9) and
  13. then multiply by the correct power of 10.  Is there an easier way to do
  14. this ???????
  15.  
  16.  
  17. -- 
  18. --------------------------------------------------------------       
  19. Kristofer Wempa                       wempa@eden.rutgers.edu   
  20. http://remus.rutgers.edu/~wempa       wempa@remus.rutgers.edu  
  21. --------------------------------------------------------------    
  22.